package com.liner.mapper;

import com.liner.entity.ProductInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

/**
 * <p>
 * 商品表 Mapper 接口
 * </p>
 *
 * @author liner
 * @since 2022-12-03
 */
public interface ProductInfoMapper extends BaseMapper<ProductInfo> {
    BigDecimal findPriceById(Integer id);

    Integer findStockById(Integer id);

    Integer updateStock(@Param("id") Integer id,@Param("stock") Integer stock);

    Integer insertStock(@Param("id") Integer id, @Param("quantity") Integer quantity);

}
